home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
os2
/
cdir2_15
/
cdir2.doc
< prev
next >
Wrap
Text File
|
1994-08-20
|
17KB
|
528 lines
Color DIRectory utility
Version 1.50 for OS/2
Copyright 1993, 1994 by Dale Couch
What is CDIR2?
--------------
CDIR2 is a utility that works the same as the DIR command that you are all
accustomed to with OS/2 and DOS, with one exception, it displays all of the
filenames in color. You can configure the default colors to use, what colors
the directory entries should be, and you can define the color that files with
certain extensions or certain strings should be.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 2
How do you use CDIR2?
---------------------
SYNTAX: CDIR2 [drive:[path]] [options]
USAGE: Where drive represents a valid disk drive, locally attached or
remotely attached via a network.
Where path represents a valid path present on that drive.
Where [options] includes any of the following:
SYNTAX: /A[adshr][-a-d-s-h-r]
USAGE: Shows files with at least these attributes, based on the following:
a represents the archive attribute
d represents the directory attribute
s represents the system attribute
h represents the hidden attribute
r represents the read only attribute
if you include a '-' in front of an attribute all files that do not
have that attribute will be shown.
EXAMPLES:
CDIR /Aas
Will show all files that have the archive and system attribute bit
set on.
CDIR /A-a-d
Will show all files that do not have the archive bit set on and will
not show any directories.
CDIR /A
Will show all files regardless of their attribute setting.
SYNTAX: /B
Usage: List filenames and extensions without displaying any other drive or
file information. When the recurse option (/S) is used the filenames
will be show with a fully qualified path.
SYNTAX: /F
USAGE: By default CDIR writes directly to the screen. This option will
force CDIR2 to go through OS/2 to display its output. Color
highlighting will not be possible when this option is on.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 3
[options] continued ...
SYNTAX: /L
USAGE: Shows all filenames in lower case.
SYNTAX: /N
USAGE: Shows the file name at the end of the line instead of at the
beginning.
SYNTAX: /O[degns][-d-e-g-n-s]
USAGE: Sorts the filenames in ascending order based on the following:
d represents sort on file date and time
e represents sort on file extension
g represents display directories first
n represents sort on file name
s represents sort on file size
If you wish to reverse the order of the sort, place a '-' before the
sort option.
EXAMPLES:
CDIR /Os
Will display files in smallest to largest file size order.
CDIR /O-s
Will display files in largest to smallest file size order.
SYNTAX: /P
USAGE: Pauses the display of files for each screen page. The page length
will be determined when CDIR is executed and will accommodate all
screen lengths. Pressing ESC at any Pause prompt will exit CDIR
without displaying any more information. Pressing N or n will
continue displaying the directory listing without pausing.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 4
[options] continued ...
SYNTAX: /R{[D][N][S][T]}{[G][GE][E][LE][L]} value
USAGE: Restrict the files that are displayed. This option will allow you to
limit the filenames that are displayed in a directory listing.
D Limit files to a date range -> value format [mm/dd/yy]
N Limit files to a name range -> value format [string]
S Limit files to a size range -> value format [0]
T Limit files to a time range -> value format [hh:mm]
G Show files greater than value
GE Show files greater than or equal to value
E Show files equal to value
LE Show files less than or equal to value
L Show files less than value
EXAMPLES:
CDIR /RDG 06/01/94
Will display all files that have a last write date greater than
06/01/1994
CDIR /RNLE CDIR
Will display all files that have a name less than or equal to CDIR
NOTE: This function does not support wild cards
CDIR /RSE 1000
Will display all files that have a file size of 1000 bytes.
CDIR /RTL 16:40
Will display all files that have a last write time of 4:40pm
SYNTAX: /S
USAGE: Recurse subdirectories, showing the contents of all subdirectories
from the current directory or [drive:[path]] down.
SYNTAX: /V
USAGE: Shows additional information about your command line options. It
will notify you of all of the options that are in effect.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 5
[options] continued ...
SYNTAX: /X [file pattern]
USAGE: Excludes files from the directory listing. You can specify any valid
file pattern including wild cards. Any file meeting the pattern will
be excluded.
EXAMPLES:
CDIR /X *.EXE
Will exclude all files with the EXE extension
SYNTAX: /2
USAGE: Shows the directory listing in 2 columns on an 80 column display and
will display in as many columns as the screen will allow in any other
screen mode. The information that will be displayed, will the be
same information that would be shown with the OS/2 DIR command.
SYNTAX: /3
USAGE: will display the directory listing in 3 columns on an 80 column
display and will display in as many columns as the screen will allow
in any other screen mode. The information that will be displayed is
the file name and file size.
A Note about redirecting output from CDIR/2
-------------------------------------------
CDIR/2 will be notified when you specify a command that redirects output to
either a file or another program through any of the standard redirection
commands (>, >>, and |). When CDIR/2 detects that redirection is taking place,
it will disable color output and the pause function.
CDIR2 Environment variable
--------------------------
The CDIR2 environment variable will allow you to specify a path other than the
location of CDIR2.EXE as the location of CDIR.CFG. It will also allow you to
specify a filename other than CDIR.CFG. Just place
SET CDIR2=[drive]:\[directory]\[filename]
in your config.sys.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 6
How do I read the CDIR2 directory listing?
------------------------------------------
Default listing format:
-----------------------
1 2 3 4 5 6
CDIR2.EXE 12345 12345 05-02-93 01:00a AHRS
1 is the files name
2 is the files size, for directory entries <DIR> will replace this number.
3 is the size of this files Extended Attribute
4 is the files last file write date
5 is the files last file write time, where:
'a' represents am
'p' represents pm
6 shows the current file attributes, where:
'A' represents Archive
'H' represents Hidden
'R' represents Read Only
'S' represents System
'-' would represent that that attribute is not set to on for that file
Long filename format (/N):
--------------------------
1 2 3 4 5 6
12345 05-02-93 01:00a AHRS 12345 CDIR2.EXE
1 is the files size, for directory entries <DIR> will replace this number.
2 is the files last file write date
3 is the files last file write time, where:
'a' represents am
'p' represents pm
4 shows the current file attributes, where:
'A' represents Archive
'H' represents Hidden
'R' represents Read Only
'S' represents System
'-' would represent that that attribute is not set to on for that file
5 is the size of this files Extended Attribute
6 is the files name
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 7
What should I know about the CDIR2.CFG configuration file?
----------------------------------------------------------
There are 4 components to the configuration file. There are definitions, which
are used to define colors for easier reading of the configuration file. To
define a color you just need to add a # before a word and then follow that by
a space and a numeric value between 0 and 255. The next component is the $
command. There are 3 $ commands: $OPTIONS, $COLOR, and $DIRECTORY which are
described below. Next there are the string identifiers. This is the string
that CDIR2 uses to identify a color sequence to use to display that file entry.
And finally there are comments, which are added by placing a ; anywhere on a new
line or after one of the other commands. A sample configuration file is
included at the end of this document. This configuration file needs to reside
in the same directory as CDIR2.EXE.
Please Note: The configuration file is read from top to bottom only once, so
you must declare any # variable before you use them or you will be notified of
an error.
What does the # command do?
---------------------------
The configuration file comes with all of the colors predefined using the #
command. If you want to be able to mix your own colors or define new names for
colors you can. If you want to be able to have a color like blinking red, do
this:
#BlinkRed RED + BLINK
Only the space between #BlinkRed and RED is required. Also at this time only
addition is supported when defining colors to use. You can use this addition
method for any color definition parameter in the configuration file
What are the $ Commands?
------------------------
$OPTIONS -- allows you to define what options you want on at all times.
$OPTIONS /p /v
$COLOR -- allows you to define the default colors to use.
$COLOR LIGHTGRAY, BLACK
$DIRECTORY -- allows you to define the default colors to use for directory
entries.
$DIRECTORY WHITE, BLACK
Note: If you do not like using # variables you can always use numbers in
their place for any setting.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 8
How do I define the Colors CDIR/2 should use?
---------------------------------------------
There are two separate ways to define what colors files will appear in. If a
period '.' is the first character then it is assumed that for all occurrences
of files with that extension that color will be used. If any other character
is first it will be assumed that for all occurrences of the string, the color
you define will be used. This option will be overridden by the color set for
the extension.
.EXE WHITE, BLUE
CDIR YELLOW, BLUE
.DIZ RED+BLINK, BLACK
If we were to use the files that came in the CDIR2.ZIP file the following would
be a description of the output.
CDIR2.EXE would appear in WHITE on a BLUE background.
CDIR2.CFG and CDIR.DOC would appear in YELLOW on a BLUE background.
FILE_ID.DIZ would appear in BLINKing RED on a BLACK background.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 9
This is shareware
-----------------
CDIR2 is shareware and as such a monetary contribution of $5 would be greatly
appreciated. If you do not feel that a contribution is appropriate, but you do
like the program, would you please send me a post card letting me know where
CDIR2 has made it to. Thank you for all of the people that have contacted me.
Warranties
----------
The author is not responsible for any problems occurring because of the use or
misuse of this program. It is the user's responsibility to be aware of the
limitations of this program, whether documented here or not. This program is
not crippled in any way and you may freely copy this program and give it to your
friends.
Contacting the Author
---------------------
There are two ways that you can let me know that you like this program. The
first is to just send a post card to me at the below address. If you find the
program useful and would like to help finance future programs like this I would
appreciate a contribution of $5.00. You can send your post card or the
contribution to:
Dale Couch
5124 Conroy Road Suite 625
Orlando, FL 32811-3739
If you would prefer to just send me an electronic message I can be reached
though any of the following mediums:
Compuserve @ Dale Couch 72622,3636
Internet @ 72622.3636@compuserve.com
RIME @ ->TREASURE
Please feel free to make suggestions or notify me of any problems that you might
find.
Credits
-------
Finally, I have a few credits to give. First, I would like to thank my father
for acting as a concept sounding board, and having a knack for finding the
perfect piece of code. I would also like to thank Ryan Smith for helping me to
start and debug this project.
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 10
Other Products
--------------
CDIR
----
There is also a DOS version of CDIR/2. CDIR shares all of the functions that
the OS/2 version does as well as the ability to share the same .CFG file.
Syncit and Syncit/2 (Comming Soon)
----------------------------------
Syncit has been designed to compare the contents of directories or entire
drives, for those of you who maintain copies of files on other media. This is
also a perfect product for those people who need to constantly update a group
of network drives. It will compare all filenames, file sizes, file date, and
even their attributes and report on any files that do not match. This product
will be available for DOS and OS/2 2.x
Cdel and Cdel/2 (Comming Soon)
------------------------------
All of the power of CDIR has been transferred into a program that will delete
files. This program will delete all of the files meeting the conditions that
you specify and will even remove directories if they are empty. This product
will be available for DOS and OS/2 2.x
Ccopy and Ccopy/2 (Comming Soon)
--------------------------------
All of the power of CDIR has been transferred into a program that will copy or
move files. It will work the same as XCOPY and have the added feature of a MODE
command. This product will be available for DOS and OS/2 2.x
CDIR/2 v1.50 (OS/2) Copyright 1994 by Dale Couch Page 11
;
; This is a sample configuration file for CDIR2. Just copy the
; contents of this page to the file CDIR2.CFG, if you are missing
; the original .CFG file.
;
#BLACK 0
#BLUE 1
#GREEN 2
#CYAN 3
#RED 4
#MAGENTA 5
#BROWN 6
#LIGHTGRAY 7
#DARKGRAY 8
#LIGHTBLUE 9
#LIGHTGREEN 10
#LIGHTCYAN 11
#LIGHTRED 12
#LIGHTMAGENTA 13
#YELLOW 14
#WHITE 15
#BLINK 128
;
; DEFAULT Program settings
;
$OPTIONS /p /v ; pause after each page and use verbose mode
$COLOR LIGHTGRAY, BLACK ; default text to white on black
$DIRECTORY LIGHTGRAY,BLACK ; default dir entries to white on black
;
; Begin Color Text definitions
;
.EXE WHITE, BLUE ; Comment after definition
CDIR YELLOW, BLUE
.DIZ RED+BLINK, BLACK